package com.example.library.mapper;

import com.example.library.entity.Bookshelf;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.library.entity.ShelfDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 胡绍杆
 * @since 2022-06-16
 */
@Repository
public interface BookshelfMapper extends BaseMapper<Bookshelf> {
    @Select("SELECT shelf_num,floor,area,shelf_state,class_name \n" +
            "FROM t_bookshelf,t_bookclass\n" +
            "WHERE t_bookshelf.class_id=t_bookclass.class_id" )
    public List<ShelfDTO> shelfPage();

}
